#pragma once

#include "CPU.h"

class C6502:public CCPU
{
public:
	CMachine *MachinePtr;
public:
	C6502();
	~C6502();
	virtual u8 A() = 0;
	virtual u8 X() = 0;
	virtual u8 Y() = 0;
	virtual u8 S() = 0;
	virtual u8 F() = 0;
	virtual u32 PC() = 0;
	virtual u32 EA() = 0;
	virtual void SetOp(ReadFunc *r) = 0;
	virtual void SetRead(ReadFunc *r) = 0;
	virtual void SetWrite(WriteFunc *w) = 0;
	virtual void SetUser(void *u) = 0;
	virtual void Init() = 0;
	virtual void Reset() = 0;
	virtual void IRQ() = 0;
	virtual void NMI() = 0;
	virtual void SetOpPage(int p,u8 *d) = 0;
	virtual void SetReadPage(int p,u8 *d) = 0;
	virtual void SetWritePage(int p,u8 *d) = 0;
	virtual void SetPage(int p,u8 *d) = 0;
	virtual u32 Execute(u32 c) = 0;
	virtual u8 Read(u32 addr) = 0;
	virtual void Write(u32 addr,u8 data) = 0;
	virtual u32 GetPC() = 0;
	virtual u8 GetOpcode() = 0;
	virtual u32 GetNextOpcodePC() = 0;
	virtual u32 GetCurrentOpcodePC() = 0;
	virtual void SaveState(CState *s) = 0;
	virtual void LoadState(CState *s) = 0;
	virtual u32 Disassemble(char *dest,u32 p) = 0;
	virtual u32 GetLastRead() = 0;
	virtual u32 GetLastWrite() = 0;
	virtual int InsideIRQ() = 0;
	virtual int InsideNMI() = 0;
	virtual char *GenerateRegNames(char *dest);
	virtual char *GenerateRegData(char *dest) = 0;
};
